Acucobol, ODBC and Postgres
Acucobol, ODBC and Postgres
am 07.04.2010 21:57:48 von Jonathan Foy
--001636499d83f624f60483aaf951
Content-Type: text/plain; charset=ISO-8859-1
Hello
I'm trying to configure the postgres odbc driver with our Acucobol
application (5.2 and 8.1), and was hoping that someone out there might have
some experience with this.
The application currently connects to our postgres databases (8.1.3 up to
8.4.2) without issue. The problem came up when I started trying to use
pgbouncer. I had it up and running from the command line, but connections
coming from the application are rejected due to a "bad packet header", which
seems to be because the connect packets are coming in with V2 in the data,
and pgbouncer only supports V3. So, we downloaded the latest driver,
compiled it (RHEL 5.4), and (in theory) recompiled cobol with the new
library (libodbcpsql.so.2.0.0) linked in. There was no apparent change.
The application can still parse the odbc.ini file to get the database name,
server, port, user, and password, but any additional settings seem to be
ignored. I can't get any logging, I can't set the Protocol version...I'm
not convinced that the proper driver is being used.
Does anyone have any ideas? Pulling my hair out...
--001636499d83f624f60483aaf951
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello
I'm trying to configure the postgres odbc driver with our =
Acucobol application (5.2 and 8.1), and was hoping that someone out there m=
ight have some experience with this.
The application currently conne=
cts to our postgres databases (8.1.3 up to 8.4.2) without issue.=A0 The pro=
blem came up when I started trying to use pgbouncer.=A0 I had it up and run=
ning from the command line, but connections coming from the application are=
rejected due to a "bad packet header", which seems to be because=
the connect packets are coming in with V2 in the data, and pgbouncer only =
supports V3.=A0 So, we downloaded the latest driver, compiled it (RHEL 5.4)=
, and (in theory) recompiled cobol with the new library (libodbcpsql.so.2.0=
..0) linked in.=A0 There was no apparent change.
The application can still parse the odbc.ini file to get the database n=
ame, server, port, user, and password, but any additional settings seem to =
be ignored.=A0 I can't get any logging, I can't set the Protocol ve=
rsion...I'm not convinced that the proper driver is being used.
Does anyone have any ideas?=A0 Pulling my hair out...
--001636499d83f624f60483aaf951--
Re: Acucobol, ODBC and Postgres
am 07.04.2010 22:06:57 von Korry Douglas
> I'm trying to configure the postgres odbc driver with our Acucobol
> application (5.2 and 8.1), and was hoping that someone out there
> might have some experience with this.
>
> The application currently connects to our postgres databases (8.1.3
> up to 8.4.2) without issue. The problem came up when I started
> trying to use pgbouncer. I had it up and running from the command
> line, but connections coming from the application are rejected due
> to a "bad packet header", which seems to be because the connect
> packets are coming in with V2 in the data, and pgbouncer only
> supports V3. So, we downloaded the latest driver, compiled it (RHEL
> 5.4), and (in theory) recompiled cobol with the new library
> (libodbcpsql.so.2.0.0) linked in. There was no apparent change.
>
> The application can still parse the odbc.ini file to get the
> database name, server, port, user, and password, but any additional
> settings seem to be ignored. I can't get any logging, I can't set
> the Protocol version...I'm not convinced that the proper driver is
> being used.
>
> Does anyone have any ideas? Pulling my hair out...
I would start by running strace on your application while it is trying
to connect. When I've run into kind of problem that you describe,
I've found that the ODBC Driver Manager is reading the wrong odbc.ini
file (for example, reading from /etc/odbc.ini when I expected /usr/
local/etc/odbc.ini).
Just run:
$ strace -o /tmp/myapp.trc
Then look through the /tmp/myapp.trc file, searching for attempts to
open odbc.ini, odbcinst.ini, and the libodbcpsql.so library.
-- Korry
------------------------------------------------------------ -----------
Korry Douglas
Senior Database Dude
EnterpriseDB Corporation
The Enterprise Postgres Company
Phone: (804)241-4301
Mobile: (620) EDB-NERD
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: Acucobol, ODBC and Postgres
am 07.04.2010 22:14:06 von jonah.harris
--00163630e9eb4767f50483ab34dc
Content-Type: text/plain; charset=ISO-8859-1
On Wed, Apr 7, 2010 at 3:27 PM, Jonathan Foy wrote:
> I'm trying to configure the postgres odbc driver with our Acucobol
> application (5.2 and 8.1), and was hoping that someone out there might have
> some experience with this.
>
About two years ago I was working on a project which used Postgres via ODBC
with both ACUCOBOL and Micro Focus. Which ODBC driver are you using? You
should try ODBCng (https://projects.commandprompt.com/public/odbcng/).
Also, you may want to try/consider using the commercial PG ODBC driver from
DataDirect (
http://www.datadirect.com/products/odbc/odbc-postgresql/inde x.ssp).
--
Jonah H. Harris
Blog: http://www.oracle-internals.com/
--00163630e9eb4767f50483ab34dc
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Wed, Apr 7, 2010 at 3:27 PM, Jonathan Foy
an dir=3D"ltr"><=
> wrote:
t: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1=
ex;">
I'm trying to configure the postgres odbc driver with our Acucobol appl=
ication (5.2 and 8.1), and was hoping that someone out there might have som=
e experience with this.
About two years ago I was =
working on a project which used Postgres via ODBC with both ACUCOBOL and Mi=
cro Focus.=A0 Which ODBC driver are you using?=A0 You should try ODBCng (
href=3D"https://projects.commandprompt.com/public/odbcng/">h ttps://project=
s.commandprompt.com/public/odbcng/).
Also, you may want to try/consider using the commercial PG ODBC driver =
from DataDirect (
stgresql/index.ssp">http://www.datadirect.com/products/odbc/ odbc-postgresql=
/index.ssp).
--
Jonah H. Harris
Blog:
e-internals.com/">http://www.oracle-internals.com/
--00163630e9eb4767f50483ab34dc--
Re: Acucobol, ODBC and Postgres
am 07.04.2010 22:15:56 von jonah.harris
--0016e6509d30d7ddea0483ab3ac0
Content-Type: text/plain; charset=ISO-8859-1
On Wed, Apr 7, 2010 at 3:36 PM, Korry Douglas <
korry.douglas@enterprisedb.com> wrote:
> I'm trying to configure the postgres odbc driver with our Acucobol
>> application (5.2 and 8.1), and was hoping that someone out there might have
>> some experience with this.
>>
>> The application currently connects to our postgres databases (8.1.3 up to
>> 8.4.2) without issue. The problem came up when I started trying to use
>> pgbouncer. I had it up and running from the command line, but connections
>> coming from the application are rejected due to a "bad packet header", which
>> seems to be because the connect packets are coming in with V2 in the data,
>> and pgbouncer only supports V3. So, we downloaded the latest driver,
>> compiled it (RHEL 5.4), and (in theory) recompiled cobol with the new
>> library (libodbcpsql.so.2.0.0) linked in. There was no apparent change.
>>
>> The application can still parse the odbc.ini file to get the database
>> name, server, port, user, and password, but any additional settings seem to
>> be ignored. I can't get any logging, I can't set the Protocol version...I'm
>> not convinced that the proper driver is being used.
>>
>> Does anyone have any ideas? Pulling my hair out...
>>
>
> I would start by running strace on your application while it is trying to
> connect. When I've run into kind of problem that you describe, I've found
> that the ODBC Driver Manager is reading the wrong odbc.ini file (for
> example, reading from /etc/odbc.ini when I expected
> /usr/local/etc/odbc.ini).
>
Yeah, I like to explicitly define my ODBCINI and ODBCINST environment
variables to avoid that issue.
--
Jonah H. Harris
Blog: http://www.oracle-internals.com/
--0016e6509d30d7ddea0483ab3ac0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Wed, Apr 7, 2010 at 3:36 PM, Korry Douglas
pan dir=3D"ltr"><
korry=
..douglas@enterprisedb.com> wrote:
il_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0=
pt 0pt 0.8ex; padding-left: 1ex;">
=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; p=
adding-left: 1ex;">
I'm trying to configure the postgres odbc driver with our Acucobol appl=
ication (5.2 and 8.1), and was hoping that someone out there might have som=
e experience with this.
The application currently connects to our postgres databases (8.1.3 up to 8=
..4.2) without issue. =A0The problem came up when I started trying to use pg=
bouncer. =A0I had it up and running from the command line, but connections =
coming from the application are rejected due to a "bad packet header&q=
uot;, which seems to be because the connect packets are coming in with V2 i=
n the data, and pgbouncer only supports V3. =A0So, we downloaded the latest=
driver, compiled it (RHEL 5.4), and (in theory) recompiled cobol with the =
new library (libodbcpsql.so.2.0.0) linked in. =A0There was no apparent chan=
ge.
The application can still parse the odbc.ini file to get the database name,=
server, port, user, and password, but any additional settings seem to be i=
gnored. =A0I can't get any logging, I can't set the Protocol versio=
n...I'm not convinced that the proper driver is being used.
Does anyone have any ideas? =A0Pulling my hair out...
I would start by running strace on your application while it is trying to c=
onnect. =A0When I've run into kind of problem that you describe, I'=
ve found that the ODBC Driver Manager is reading the wrong odbc.ini file (f=
or example, reading from /etc/odbc.ini when I expected /usr/local/etc/odbc.=
ini).
Yeah, I like to explicitly define my ODBCINI and ODBC=
INST environment variables to avoid that issue.
--
J=
onah H. Harris
Blog: http:/=
/www.oracle-internals.com/
--0016e6509d30d7ddea0483ab3ac0--
Re: Acucobol, ODBC and Postgres
am 07.04.2010 22:55:45 von Jonathan Foy
--001636499e5334b1860483abc947
Content-Type: text/plain; charset=ISO-8859-1
The application is actually launched from a windows box via a thin
client...I'm not sure how I would run it with strace.
However, I'm fairly sure I'm pulling in the correct one, if I change the
port it fails, as it should. Switch it back and it works. Of all the odbc
entries on the system (from a root level search for both odbc.ini and
..odbc.ini), only the one has this database entry in it at all. And it WILL
connect, just not do what I want it to.
On Wed, Apr 7, 2010 at 4:06 PM, Korry Douglas <
korry.douglas@enterprisedb.com> wrote:
> I'm trying to configure the postgres odbc driver with our Acucobol
>> application (5.2 and 8.1), and was hoping that someone out there might have
>> some experience with this.
>>
>> The application currently connects to our postgres databases (8.1.3 up to
>> 8.4.2) without issue. The problem came up when I started trying to use
>> pgbouncer. I had it up and running from the command line, but connections
>> coming from the application are rejected due to a "bad packet header", which
>> seems to be because the connect packets are coming in with V2 in the data,
>> and pgbouncer only supports V3. So, we downloaded the latest driver,
>> compiled it (RHEL 5.4), and (in theory) recompiled cobol with the new
>> library (libodbcpsql.so.2.0.0) linked in. There was no apparent change.
>>
>> The application can still parse the odbc.ini file to get the database
>> name, server, port, user, and password, but any additional settings seem to
>> be ignored. I can't get any logging, I can't set the Protocol version...I'm
>> not convinced that the proper driver is being used.
>>
>> Does anyone have any ideas? Pulling my hair out...
>>
>
> I would start by running strace on your application while it is trying to
> connect. When I've run into kind of problem that you describe, I've found
> that the ODBC Driver Manager is reading the wrong odbc.ini file (for
> example, reading from /etc/odbc.ini when I expected
> /usr/local/etc/odbc.ini).
>
> Just run:
>
> $ strace -o /tmp/myapp.trc
>
> Then look through the /tmp/myapp.trc file, searching for attempts to open
> odbc.ini, odbcinst.ini, and the libodbcpsql.so library.
>
> -- Korry
>
>
>
>
> ------------------------------------------------------------ -----------
> Korry Douglas
> Senior Database Dude
> EnterpriseDB Corporation
> The Enterprise Postgres Company
>
> Phone: (804)241-4301
> Mobile: (620) EDB-NERD
>
>
>
--001636499e5334b1860483abc947
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
The application is actually launched from a windows box via a thin client..=
..I'm not sure how I would run it with strace.
However, I'm f=
airly sure I'm pulling in the correct one, if I change the port it fail=
s, as it should.=A0 Switch it back and it works. Of all the odbc entries on=
the system (from a root level search for both odbc.ini and .odbc.ini), onl=
y the one has this database entry in it at all.=A0 And it WILL connect, jus=
t not do what I want it to.
On Wed, Apr 7, 2010 at 4:06 PM, Korry Do=
uglas
<
m">korry.douglas@enterprisedb.com> wrote:
s=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px soli=
d rgb(204, 204, 204); padding-left: 1ex;">
=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); p=
adding-left: 1ex;">
I'm trying to configure the postgres odbc driver with our Acucobol appl=
ication (5.2 and 8.1), and was hoping that someone out there might have som=
e experience with this.
The application currently connects to our postgres databases (8.1.3 up to 8=
..4.2) without issue. =A0The problem came up when I started trying to use pg=
bouncer. =A0I had it up and running from the command line, but connections =
coming from the application are rejected due to a "bad packet header&q=
uot;, which seems to be because the connect packets are coming in with V2 i=
n the data, and pgbouncer only supports V3. =A0So, we downloaded the latest=
driver, compiled it (RHEL 5.4), and (in theory) recompiled cobol with the =
new library (libodbcpsql.so.2.0.0) linked in. =A0There was no apparent chan=
ge.
The application can still parse the odbc.ini file to get the database name,=
server, port, user, and password, but any additional settings seem to be i=
gnored. =A0I can't get any logging, I can't set the Protocol versio=
n...I'm not convinced that the proper driver is being used.
Does anyone have any ideas? =A0Pulling my hair out...
I would start by running strace on your application while it is trying to c=
onnect. =A0When I've run into kind of problem that you describe, I'=
ve found that the ODBC Driver Manager is reading the wrong odbc.ini file (f=
or example, reading from /etc/odbc.ini when I expected /usr/local/etc/odbc.=
ini).
Just run:
=A0 =A0 =A0 =A0$ strace -o /tmp/myapp.trc <your application name goes h=
ere>
Then look through the /tmp/myapp.trc file, searching for attempts to open o=
dbc.ini, odbcinst.ini, and the libodbcpsql.so library.
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Korry
------------------------------------------------------------ -----------
Korry Douglas
Senior Database Dude
EnterpriseDB Corporation
The Enterprise Postgres Company
Phone: (804)241-4301
Mobile: (620) EDB-NERD
--001636499e5334b1860483abc947--
Re: Acucobol, ODBC and Postgres
am 07.04.2010 23:05:16 von Jonathan Foy
--0016e65b5dd65906830483abebd0
Content-Type: text/plain; charset=ISO-8859-1
I'm using (or think I am) the latest psqlODBC download from the postgresql
website. 8.04.0200. It was compiled and then linked into runcbl via the
ACUSQL_ODBC_LIB variable, which then gets passed up the chain, in the
Makefile (for runcbl). Is this not the correct way to do it?
I'm under the impression that I'm bypassing unixODBC, but I am fairly new
with this (cobol/odbc). So I could be wrong.
ODBCng is no longer being developed, I'm not sure that that's the route I
want to take for the future. And convincing Higher Ups to go the commercial
route would be difficult...
On Wed, Apr 7, 2010 at 4:14 PM, Jonah H. Harris wrote:
> On Wed, Apr 7, 2010 at 3:27 PM, Jonathan Foy wrote:
>
>> I'm trying to configure the postgres odbc driver with our Acucobol
>> application (5.2 and 8.1), and was hoping that someone out there might have
>> some experience with this.
>>
>
> About two years ago I was working on a project which used Postgres via ODBC
> with both ACUCOBOL and Micro Focus. Which ODBC driver are you using? You
> should try ODBCng (https://projects.commandprompt.com/public/odbcng/).
>
> Also, you may want to try/consider using the commercial PG ODBC driver from
> DataDirect (
> http://www.datadirect.com/products/odbc/odbc-postgresql/inde x.ssp).
>
> --
> Jonah H. Harris
> Blog: http://www.oracle-internals.com/
>
--0016e65b5dd65906830483abebd0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I'm using (or think I am) the latest psqlODBC download from the postgre=
sql website.=A0 8.04.0200.=A0 It was compiled and then linked into runcbl v=
ia the ACUSQL_ODBC_LIB variable, which then gets passed up the chain, in th=
e Makefile (for runcbl).=A0 Is this not the correct way to do it?
I'm under the impression that I'm bypassing unixODBC, but I am =
fairly new with this (cobol/odbc).=A0 So I could be wrong.
ODBCng is=
no longer being developed, I'm not sure that that's the route I wa=
nt to take for the future.=A0 And convincing Higher Ups to go the commercia=
l route would be difficult...
On Wed, Apr 7, 2010 at 4:14 PM, Jonah H. Har=
ris
<jonah.h=
arris@gmail.com> wrote:
style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 20=
4); padding-left: 1ex;">
On Wed, Apr 7, 2010 at 3:27 PM=
, Jonathan Foy
<
rget=3D"_blank">thefoy@gmail.com> wrote:
=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin=
: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm trying to configure the postgres odbc driver with our Acucobol appl=
ication (5.2 and 8.1), and was hoping that someone out there might have som=
e experience with this.
About two years ago =
I was working on a project which used Postgres via ODBC with both ACUCOBOL =
and Micro Focus.=A0 Which ODBC driver are you using?=A0 You should try ODBC=
ng (
"_blank">https://projects.commandprompt.com/public/odbcng/).
Also, you may want to try/consider using the commercial PG ODBC driver =
from DataDirect (
stgresql/index.ssp" target=3D"_blank">http://www.datadirect.com/products/od=
bc/odbc-postgresql/index.ssp).
--
Jonah H. Harris
Blog:
e-internals.com/" target=3D"_blank">http://www.oracle-internals.com/
>
--0016e65b5dd65906830483abebd0--